package com.systop.asset.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 资产领用记录对象 asset_assignments
 *
 * @author ruoyi
 * @date 2025-06-21
 */
public class AssetAssignments extends BaseEntity {
    private static final long serialVersionUID = 1L;
    //审批模板id
    private Long templateId;
    /**
     * 领用ID
     */
    private Long id;

    /**
     * 资产ID
     */
    private Long assetsId;

    /**
     * 领用人ID
     */
    private Long userId;

    /**
     * 位置ID
     */
    private Long locationId;
    /**
     * 所属部门ID
     */
    private Long deptId;

    /**
     * 使用状态 1-正常使用 2-已退还 3-其他
     */
    private Long useStatus;

    /**
     * 领用日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date assignDate;
    private String assignTime;
    /**
     * 预计归还日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expectedReturn;

    /**
     * 实际归还日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date actualReturn;

    /**
     * 使用用途说明（备注）
     */
    private String usagePurpose;

    /**
     * 操作人ID
     */
    private Long operatorId;

    /**
     * 软删除标记
     */
    private Integer isDeleted;
    /**
     * 资产名称
     */
    private String assName;
    /**
     * 资产详情单
     */
    private List<AssetAssignmentsDetail> assets;
    /**
     * 领用类型 0-资产 1-耗材
     */
    private Integer type;
    private String materialName;
    private String materialSpecification;
    private String materialUnit;
    private String materialCode;

    public String getAssignTime() {
        return assignTime;
    }

    public void setAssignTime(String assignTime) {
        this.assignTime = assignTime;
    }

    public String getMaterialUnit() {
        return materialUnit;
    }

    public void setMaterialUnit(String materialUnit) {
        this.materialUnit = materialUnit;
    }

    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getMaterialSpecification() {
        return materialSpecification;
    }

    public void setMaterialSpecification(String materialSpecification) {
        this.materialSpecification = materialSpecification;
    }

    public int getMaterialNum() {
        return materialNum;
    }

    public void setMaterialNum(int materialNum) {
        this.materialNum = materialNum;
    }

    private int materialNum;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<AssetAssignmentsDetail> getAssets() {
        return assets;
    }

    public void setAssets(List<AssetAssignmentsDetail> assets) {
        this.assets = assets;
    }

    public String getAssName() {
        return assName;
    }

    public void setAssName(String assName) {
        this.assName = assName;
    }

    public Long getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Long templateId) {
        this.templateId = templateId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setAssetsId(Long assetsId) {
        this.assetsId = assetsId;
    }

    public Long getAssetsId() {
        return assetsId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setUseStatus(Long useStatus) {
        this.useStatus = useStatus;
    }

    public Long getUseStatus() {
        return useStatus;
    }

    public void setAssignDate(Date assignDate) {
        this.assignDate = assignDate;
    }

    public Date getAssignDate() {
        return assignDate;
    }

    public void setExpectedReturn(Date expectedReturn) {
        this.expectedReturn = expectedReturn;
    }

    public Date getExpectedReturn() {
        return expectedReturn;
    }

    public void setActualReturn(Date actualReturn) {
        this.actualReturn = actualReturn;
    }

    public Date getActualReturn() {
        return actualReturn;
    }

    public void setUsagePurpose(String usagePurpose) {
        this.usagePurpose = usagePurpose;
    }

    public String getUsagePurpose() {
        return usagePurpose;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public Long getLocationId() {
        return locationId;
    }

    public void setLocationId(Long locationId) {
        this.locationId = locationId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("assetsId", getAssetsId())
                .append("userId", getUserId())
                .append("deptId", getDeptId())
                .append("useStatus", getUseStatus())
                .append("assignDate", getAssignDate())
                .append("expectedReturn", getExpectedReturn())
                .append("actualReturn", getActualReturn())
                .append("usagePurpose", getUsagePurpose())
                .append("operatorId", getOperatorId())
                .append("isDeleted", getIsDeleted())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
